// 《围棋》作者版权所有。版权所有。
// 此源代码的使用受BSD样式
// 许可证的约束，该许可证可以在许可证文件中找到。

// 开始：构建openbsd&！mips64 
// /+构建openbsd，！mips64 

package runtime

import "unsafe"

// X版本的syscall期望libc调用返回64位结果。
// 否则（非X版本）需要32位结果。
// 之所以需要这种区别，是因为返回-1表示错误，
// 我们需要知道是检查结果的32位还是64位。
// （一些返回32位的libc函数将垃圾放在AX的上32位。）

// go:linkname syscall\u syscall syscall.syscall 
// go:nosplit 
// go:cgo\u unsafe\u args 
func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2, err uintptr) {
	entersyscall()
	libcCall(unsafe.Pointer(funcPC(syscall)), unsafe.Pointer(&fn))
	exitsyscall()
	return
}
func syscall()

// go:linkname syscall\u syscallX syscallX syscallX syscall.syscallX 
// go:nosplit 
func syscall_syscallX(fn, a1, a2, a3 uintptr) (r1, r2, err uintptr) {
	entersyscall()
	libcCall(unsafe.Pointer(funcPC(syscallX)), unsafe.Pointer(&fn))
	exitsyscall()
	return
}
func syscallX()

// go:linkname syscall
// go:cgo\u unsafe\u args 
func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) {
	entersyscall()
	libcCall(unsafe.Pointer(funcPC(syscall6)), unsafe.Pointer(&fn))
	exitsyscall()
	return
}
func syscall6()

// go:linkname syscall\u syscall 6x syscall.syscall6X 
// go:nosplit 
// go cgo\u unsafe\u args 
func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) {
	entersyscall()
	libcCall(unsafe.Pointer(funcPC(syscall6X)), unsafe.Pointer(&fn))
	exitsyscall()
	return
}
func syscall6X()

// go linkname syscall 10 syscall 10 syscall syscall 10 
// go go nosplit 
func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2, err uintptr) {
	entersyscall()
	libcCall(unsafe.Pointer(funcPC(syscall10)), unsafe.Pointer(&fn))
	exitsyscall()
	return
}
func syscall10()

// go:nosplit 
// go:cgo\u unsafe\u args 
func syscall_syscall10X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2, err uintptr) {
	entersyscall()
	libcCall(unsafe.Pointer(funcPC(syscall10X)), unsafe.Pointer(&fn))
	exitsyscall()
	return
}
func syscall10X()

// go:linkname syscall\u rawsystcall\u rawsystcall syscall.rawscall 
// go:nosplit 
// go:cgo\u unsafe\u args 
func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2, err uintptr) {
	libcCall(unsafe.Pointer(funcPC(syscall)), unsafe.Pointer(&fn))
	return
}

// go:linkname syscall\u rawscall
// go:cgo_unsafe_args 
func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) {
	libcCall(unsafe.Pointer(funcPC(syscall6)), unsafe.Pointer(&fn))
	return
}

// go:linkname syscall\u rawSyscall6X syscall.rawSyscall6X 
// go:nosplit 
// go cgo_unsafe_args 
func syscall_rawSyscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) {
	libcCall(unsafe.Pointer(funcPC(syscall6X)), unsafe.Pointer(&fn))
	return
}

// go go linkname syscall u rawsystcall10x syscall.rawscall10x 
func syscall_rawSyscall10X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2, err uintptr) {
	libcCall(unsafe.Pointer(funcPC(syscall10X)), unsafe.Pointer(&fn))
	return
}
